<?php 
require_once '../include.php';
$pageSize=10;
@$page=$_REQUEST['page']?(int)$_REQUEST['page']:1;

@$cId = $_REQUEST['cId']?$_REQUEST['cId']:null;
@$whereStr = $_REQUEST['whereStr']?$_REQUEST['whereStr']:null;
if($cId){
	$whereStr = "and c.id =".$cId;
}
$rows=getProByPage($page,$pageSize,$whereStr);  //项目列表
$cate=getCateById($cId);
$loopCounts=ceil($totalRows/3);
?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>项目案例</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <link rel="shortcut icon" href="/favicon.ico">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm.min.css">
    <link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm-extend.min.css">
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="page">
    <header style="background:#fff">
        <span class="information-color"></span> <span class="information-title">成功案例</span><span class="information-navigation"><a href="index.php">首页</a>><?php echo $cate['cName'] ?></span>
    </header>
    <div>
        <div class="list-block">
            <ul>
                 <?php for($i=0;$i<$loopCounts;$i++){?>
	
				<li class="item-content">
                    <div class="item-inner">
                        <div class="item-title">
							<?php if($totalRows>(3*$i)):?>
							<?php $proImgs=getAllImgByProId($rows[3*$i]['pId']);?>
                            <a href="show.php?id=<?php echo $rows[3*$i]['pId']?>"><img class="detail-img" src="../admin/uploads/<?php echo $proImgs[0]['albumPath']?>"></a>
							<?php endif;?>
							<?php if($totalRows>(3*$i)+1):?>
							<?php $proImgs=getAllImgByProId($rows[(3*$i)+1]['pId']);?>
                            <a href="show.php?id=<?php echo $rows[(3*$i)+1]['pId']?>"><img class="detail-img" src="../admin/uploads/<?php echo $proImgs[0]['albumPath']?>"></a>
							<?php endif;?>
							<?php if($totalRows>(3*$i)+2):?>
							<?php $proImgs=getAllImgByProId($rows[(3*$i)+2]['pId']);?>
                            <a href="show.php?id=<?php echo $rows[(3*$i)+2]['pId']?>"><img class="detail-img" src="../admin/uploads/<?php echo $proImgs[0]['albumPath']?>"></a>
							<?php endif;?>
                        </div>
                    </div>
                </li>
				<?php } ?>
            </ul>
        </div>
    </div>
    <!--sheet-->
    <!--页脚-->
    <div>
        <nav class="bar bar-tab" style="background:#3f4447;z-index: 9999;">
            <a class="tab-item active" style="color:#fff" href="index.php">
                <span class="icon icon-home"></span>
                <span class="tab-label">首页</span>
            </a>
            <a class="tab-item" style="color:#fff" href="quotation.php">
                <span class="icon icon-card"></span>
                <span class="tab-label">申请报价</span>
            </a>
            <a class="tab-item" style="color:#fff" href="message.php">
                <span class="icon icon-message"></span>
                <span class="tab-label">留言咨询</span>
            </a>
            <a class="tab-item" style="color:#fff" href="tel:4000072972">
                <span class="icon icon-phone"></span>
                <span class="tab-label">一键拨打</span>
            </a>
        </nav>
    </div>
    <span class="bottom_footer">广州市柏澳景观设计有限公司 版权所有</span>

</div>
<script type='text/javascript' src='//g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>
<script type='text/javascript' src='//g.alicdn.com/msui/sm/0.6.2/js/sm.min.js' charset='utf-8'></script>
</body>
</html>